package com.xiang.feign;

import com.xiang.doman.Good;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("tcc-good")
public interface GoodFeign {
    @GetMapping("/good/getById")
    Good findById(@RequestParam("goodId") int goodId);

    @PutMapping("/good/reduceStock")
    void reduceStock(@RequestParam("goodId") int goodId,@RequestParam("num") int num);
}
